home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
ASM
/
ATSTATUS.ASM
next >
Wrap
Assembly Source File
|
2000-09-26
|
3KB
|
200 lines
code segment
assume cs:code,ds:code
org 0
jIntNum equ 4
keyIntNum equ 16h
befehl equ 2
status equ 3
end_adr equ 14
reg_bp equ 22
reg_sp equ 20
reg_ss equ 18
reg_cs equ 16
reg_es equ 14
reg_di equ 12
reg_ds equ 10
reg_si equ 8
reg_dx equ 6
reg_cx equ 4
reg_bx equ 2
reg_ax equ 0
reg_dl equ 6
reg_cl equ 4
reg_bl equ 2
reg_al equ 0
reg_dh equ 7
reg_ch equ 5
reg_bh equ 3
reg_ah equ 1
erst_b equ this byte
umbtreiber:
dw -1,-1 ; DOS-Intern
db 0,80h ; Flags
soffset dw offset strat ; Strategie-Routine
ioffset dw offset intr ; Interrupt-Routine
db "$ATSTAT0" ; UMB-Kennung
old_int equ this dword
old_int_ofs dw 0
old_int_seg dw 0
dummy proc far
ret
dummy endp
new_int proc far
push ax
push bx
push cx
push dx
push di
push si
push bp
push ds
push es
pushf
push cs
pop ds
; -------------------
mov ah,1
mov al,jIntNum
int 0b
cmp di,-1
je weiter
cmp es:b[di+2],255
jne weiter
mov ds,040
mov dl,es:b[di]
or ds:b[017h],dl
mov dl,es:b[di+1]
or ds:b[018h],dl
weiter:
; -------------------
popf
pop es
pop ds
pop bp
pop si
pop di
pop dx
pop cx
pop bx
pop ax
jmp [cs:old_int]
new_int endp
; ---------------------------
ende equ this byte
db_ptr dw (?),(?)
strat proc far
mov cs:db_ptr,bx
mov cs:db_ptr+2,es
ret
strat endp
intr proc far
push ax
push bx
push cx
push dx
push di
push si
push bp
push ds
push es
pushf
push cs
pop ds
les di,dword ptr db_ptr
mov bl,es:[di+befehl]
cmp bl,0
je bc_okay
mov ax,8003h
jmp short intr_end
bc_okay:
call init
intr_end label near
or ax,0100h
mov es:[di+status],ax
popf
pop es
pop ds
pop bp
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
intr endp
init proc near
mov word ptr es:[di+end_adr],offset ende
mov word ptr es:[di+end_adr+2],cs
mov dx,offset initm
mov ah,9
int 21h
mov ah,35h
mov al,keyIntNum
int 21h
mov old_int_ofs,bx
mov old_int_seg,es
mov ah,25h
mov al,keyIntNum
mov dx,offset new_int
int 21h
mov dx,offset sokay
mov ah,9
int 21h
mov ioffset,offset dummy
mov soffset,offset dummy
xor ax,ax
ret
init endp
; ************ Installationsmeldungen beim Start
initm db "ATKeyboard Keyboard Status. Copyright (C) 1994 by Thomas Dreibholz",13,10
db "All rights reserved worldwide.",13,10,"$"
sokay db "Treiber wurde erfolgreich installiert.",13,10,10,"$"
code ends
end